package com.dhecp.project.storage.mapper;

import java.util.List;
import java.util.Map;

import com.dhecp.project.storage.domain.StockControl;
import org.apache.ibatis.annotations.Param;

import com.dhecp.core.genericDao.GenericDao;
import com.dhecp.project.business.domain.FbaProductActive;
import com.dhecp.project.common.domain.UpdateFlow;
import com.dhecp.project.storage.domain.DeliveryRequest;
import com.dhecp.project.storage.domain.DeliveryRequestDetail;
import com.dhecp.project.storage.domain.GaugeMaintenance;

/**
 * DAO
 * @author Jason
 */
public interface DeliveryRequestMapper extends GenericDao<DeliveryRequest, String>  {

	/**
     * 查询实体
     * @author Jason
	 */
	List<DeliveryRequest> select(Map<String, Object> params);

	/**
	 * 查询详情
	 * @author Jason
	 */
	List<DeliveryRequestDetail> querySonListByBid(Map<String, Object> params);

	/**
	 * 查询箱规维护
	 * @param params
	 * @return
	 */
	List<DeliveryRequestDetail> selectGuageByStore(Map<String, Object> params);
	/**
	 * 查询库存编码
	 */
	List<FbaProductActive> findFbaProductByDeliveryRequestDetail(Map<String, Object> params);

	/**
	 * 查询库存编码
	 */
	StockControl findByMultiparameterByDelivery(Map<String, Object> params);


	DeliveryRequest queryFirstByGuid(@Param("guid") String guid);


	DeliveryRequest findByBid(@Param("bid") String bid);

	/**
	 * 新增实体
	 * @author Jason
	 */
	int inserDeliveryRequest(DeliveryRequest entity);

	/**
	 * 通过guid修改实体
	 * @author Jason
	 */
	int updateByGuid(DeliveryRequest entity);

	/**
	 *@Description: 修改流程状态及生效标志（仅需 guid、activeFlow、effectStock、updateTime）
	 *@Param: [updateFlow]
	 *@return: int
	 *@Author: hlf
	 *@date: 2022-05-09 10:13
	 */
	int updateFlow(UpdateFlow updateFlow);

	/**
	 *@Description: 修改审核状态
	 */
	int updateState(@Param("bid")String bid, @Param("stateName")String stateName);

}
